package com.jjwxc.jwjskandriod.framework.http;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;


public class FFNetWorkUtils {
	/**
	 * 获取get方法字符
	 */
	public static String getGetString(Object... paramArray){
		StringBuilder params = new StringBuilder("?");
		if (paramArray != null && paramArray.length != 0) {
			int max = paramArray.length;
			for (int i = 0; i < max; i++) {
				Object str = paramArray[++i] == null ? "" : paramArray[i];
				try {
					params.append(paramArray[i - 1] + "="
							+ URLEncoder.encode(str.toString(), "utf-8") + "&");
				} catch (UnsupportedEncodingException e) {
					e.printStackTrace();
				}
			}
		}
		return params.toString().substring(0, params.length() - 1);
	}


}
